package com.vic.designpattern.patterns.c_behavioral.state.demo1;

import java.util.Scanner;

/**
 * @author victor
 *
 * https://www.liaoxuefeng.com/wiki/1252599548343744/1281319592001569
 */
public class Client {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        BotContext botContext = new BotContext();
        for(;;) {
            System.out.print("> ");
            String input = scanner.nextLine();
            String output = botContext.chat(input);
            System.out.println(output.isEmpty() ? "no reply" : "< " + output);
        }
    }

}
